#include "Card.h"

Card::Card(QDomNode cardElement):ActionCollection(cardElement,NULL)
{
//    //set the imagefilename from the xml attribute
//    ImageFileName = *(new QString(cardElement.attributeNode("ImageKey").value()));
//    //retrieve all action elements at current level
//    QDomNodeList actionNodeList = cardElement.childNodes();
//    //iterate over each action in the list
//    for(int i = 0; i < actionNodeList.count(); i++)
//    {
//
//    }

}

Card::~Card()
{

}

void Card::Do()
{
    //timestamp action
    //TimeStamp = QDateTime::currentDateTime();

    //iterate over all actions in the collection
    for(currentActionIndex = 0; currentActionIndex < Actions.count(); currentActionIndex++)
        //call abstract method on action pointer
        Actions[currentActionIndex]->Do();
}

QDomElement Card::ToResultXml()
{
    return QDomElement();
}
